package edu.nf.vrs.reservation.service;

import edu.nf.vrs.reservation.dao.ReservationDao;
import edu.nf.vrs.reservation.entity.Reservation;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Lv
 * @date 2022/3/30
 */
@Service
@Transactional(rollbackFor = RuntimeException.class)
@RequiredArgsConstructor
public class ReservePersistService {

    private final ReservationDao reservationDao;

    /**
     * 添加预约记录
     * @param reservation
     */
    public void saveReservation(Reservation reservation){
        reservationDao.addReservation(reservation);
    }

}
